# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=tokodon
pkgver=24.08.2
pkgrel=1
pkgdesc="A Mastodon client for Plasma and Plasma Mobile"
url="https://invent.kde.org/network/tokodon/"
# armhf blocked by qt6-qtdeclarative -> kirigami
# riscv64, ppc64le, s390x and loongarch64 blocked by qt6-qtwebengine -> qt6-qtwebview
arch="all !armhf !riscv64 !ppc64le !s390x !loongarch64"
license="GPL-3.0-only AND CC0-1.0"
depends="
	kdeclarative
	kirigami
	kirigami-addons
	purpose
	qqc2-desktop-style
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kirigami-dev
	knotifications-dev
	kunifiedpush-dev
	mpvqt-dev
	purpose-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	qt6-qtmultimedia-dev
	qt6-qtsvg-dev
	qt6-qtwebsockets-dev
	qt6-qtwebview-dev
	qtkeychain-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/network/tokodon.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/tokodon-$pkgver.tar.xz"
# No tests
options="!check"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9f41ec9c704334048c657e6fbd9dd4f2c7630f37237731eb03a0fd69b3c3a43d06689cb7831de61bf8b4e632451893e673b34a8a0a121cc146672461de694ae2  tokodon-24.08.2.tar.xz
"
